package com.ugoodtech.mdcc.web.dto;


import com.ugoodtech.mdcc.core.Constants;
import com.ugoodtech.mdcc.core.domain.UserLog;
import com.ugoodtech.mdcc.core.utils.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * Copyright © 2013 All Rights Reserved, Ugood Technology, Inc.
 */
@ApiModel("日志RES模型")
public class LogResponse {
    @ApiModelProperty("操作人")
    private String operateUser;
    @ApiModelProperty("操作人身份")
    private String operateUserType;
    @ApiModelProperty("维修站ID")
    private String stationId;
    @ApiModelProperty("维修站名称")
    private String stationName;
    @ApiModelProperty("业务类型")
    private String businessType;
    @ApiModelProperty("操作类型")
    private String operateType;
    @ApiModelProperty("操作时间")
    private String creationTime;
    @ApiModelProperty("操作IP")
    private String operateIP;
    @ApiModelProperty("描述")
    private String description;
    @ApiModelProperty("操作平台")
    private String platform;

    public LogResponse(UserLog userLog) {
        this.operateUser= userLog.getName();
        this.stationId= userLog.getStationNo();
        this.stationName= userLog.getStationName();
        this.businessType= userLog.getBusinessType();
        this.operateType= userLog.getOperateType();
        this.creationTime=DateUtil.formatDate(userLog.getCreationTime(),Constants.DATE_TIME_FORMAT);
        this.operateIP=userLog.getOperateIp();
        this.description=userLog.getOperateDesc();
        this.platform=userLog.getPlatform();
        this.operateUserType = userLog.getUser().getUserType().name();
    }

    public String getOperateUser() {
        return operateUser;
    }

    public void setOperateUser(String operateUser) {
        this.operateUser = operateUser;
    }

    public String getStationId() {
        return stationId;
    }

    public void setStationId(String stationId) {
        this.stationId = stationId;
    }

    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public String getOperateType() {
        return operateType;
    }

    public void setOperateType(String operateType) {
        this.operateType = operateType;
    }

    public String getCreationTime() {
        return creationTime;
    }

    public void setCreationTime(String creationTime) {
        this.creationTime = creationTime;
    }

    public String getOperateIP() {
        return operateIP;
    }

    public void setOperateIP(String operateIP) {
        this.operateIP = operateIP;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    public String getOperateUserType() {
        return operateUserType;
    }

    public void setOperateUserType(String operateUserType) {
        this.operateUserType = operateUserType;
    }
}
